package com.weixing.mall.provider.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.weixing.mall.provider.model.domain.Banner;
import com.weixing.mall.provider.model.dto.cms.BannerDto;
import com.weixing.mall.provider.model.enums.cms.BannerLocEunm;
import com.weixing.mall.provider.model.enums.cms.BannerTypeEunm;
import com.weixing.mall.provider.model.query.BannerQuery;
import com.weixing.mall.provider.model.vo.cms.BannerVo;

import java.util.List;

/**
 * <p>
 * 轮播图表 服务类
 * </p>
 *
 * @author Small
 * @since 2019-11-18
 */
public interface IBannerService extends IService<Banner> {

    /**
     * @Description 轮播图分页条件查询 <br/>
     * @author gjq
     * @date 2019/7/26 10:15
     * @param page
     * @Param: bannerQuery
     * @return com.github.pagehelper.PageInfo<com.weixing.mall.provider.model.vo.cms.BannerVo>
     */
    IPage<BannerVo> selectOfPage(Page page, BannerQuery bannerQuery);

    /**
     * @Description 保存轮播图 <br/>
     * @author gjq
     * @date 2019/7/26 10:16
     * @param bannerDto
     * @return void
     */
    void save(BannerDto bannerDto);
    /**
     * @Description 批量删除 <br/>
     * @author gjq
     * @date 2019/8/8 16:24
     * @param ids
     * @return void
     */
    void deleteAll(int[] ids);

    /**
     * @Description 通过id查询轮播图详情 <br/>
     * @author gjq
     * @date 2019/10/31 9:32
     * @param id
     * @return com.weixing.mall.provider.model.vo.cms.BannerVo
     */
    BannerVo getBannerById(long id);


    List<BannerVo> selectListByType(BannerLocEunm bannerLoc, BannerTypeEunm banner);
}
